from uuid import UUID

from pydantic import BaseModel


class LoyverseStore(BaseModel):
    store_id: str
    pricing_type: str
    price: float
    available_for_sale: bool
    optimal_stock: int | None = None
    low_stock: int | None = None


class ProductVariant(BaseModel):
    variant_id: UUID
    item_id: str
    sku: str
    cost: float
    default_pricing_type: str | None = None
    stores: list[LoyverseStore]


class Product(BaseModel):
    id: UUID
    variants: list[ProductVariant]


class Category(BaseModel):
    id: UUID
    name: str


class ReceiptLine(BaseModel):
    variant_id: UUID
    sku: str
    price: int
    quantity: int


class LoyverseReceipt(BaseModel):
    receipt_number: str
    line_items: list[ReceiptLine]
    total_money: float
    created_at: str
